{ext->get_comments_by_nr assign="elements" id=$data.page.id nr=$smarty.get.nr}
{foreach from=$elements key="key" item="el"}
{if $el.type_of_value == 'textarea'}
	<table width="100%" cellpadding="0" cellspacing="0">
		<tr>
			<td height="1" bgcolor="#DBE1E5"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
		</tr>
	</table>
	<table width="100%" cellpadding="0" cellspacing="0" bgcolor="#F8F9F9">
		<tr>
			<td width="15"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
			<td height="25" class="defaultFormLabel">{t t=$el.name}</td>		
		</tr>
	</table>
	<table cellpadding="0" cellspacing="0" width="100%"  bgcolor="#F8F9F9">
		<tr>
			<td width="15"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
			<td><textarea name="{$el.name}" class="defaultInputTextarea">{$el.value|escape:"html"}</textarea></td>
			<td width="15"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
		</tr>
	</table>
	<table width="100%" cellpadding="0" cellspacing="0"  bgcolor="#F8F9F9">
		<tr>
			<td height="15"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>		
		</tr>
	</table>
{elseif $el.type_of_value == 'date'}
<table width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td height="1" bgcolor="#DBE1E5"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
	</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0" bgcolor="#F8F9F9">	
	<tr>
		<td width="15"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
		<td width="25%" height="25" class="defaultFormLabel">{t t=$el.name}</td>
		<td>
			{assign var="value" value=$el.value}					
			<script language="javascript" type="text/javascript">
			function {$el.name}form_date()
			{ldelim}	
				y=form{$data.page.id}.{$el.name}_y.value;
				m=form{$data.page.id}.{$el.name}_m.value;
				d=form{$data.page.id}.{$el.name}_d.value;
				h=form{$data.page.id}.{$el.name}_h.value;
				i=form{$data.page.id}.{$el.name}_i.value;
				s=form{$data.page.id}.{$el.name}_s.value;	
				
				form{$data.page.id}.{$el.name}.value=y+'.'+m+'.'+d+'.'+h+'.'+i+'.'+s;	
				
				//alert(form{$data.page.id}.{$el.name}.value);				
			{rdelim}
			</script>
			<input type="hidden" name="{$el.name}" value="{if $el.value!='empty' && !$value}{$smarty.now|date:"Y"}.{$smarty.now|date:"m"}.{$smarty.now|date:"d"}.{$smarty.now|date:"H"}.{$smarty.now|date:"i"}.{$smarty.now|date:"s"}{/if}{if $value}{$value|date:"Y"}.{$value|date:"m"}.{$value|date:"d"}.{$value|date:"H"}.{$value|date:"i"}.{$value|date:"s"}{/if}">
			<input type="text" name="{$el.name}_y" value="{if $el.value!='empty' && !$value}{$smarty.now|date:"Y"}{/if}{if $value}{$value|date:"Y"}{/if}" size="4" maxlength="4" class="defaultInputText" style="width:auto" onChange="{$el.name}form_date()">
			<input type="text" name="{$el.name}_m" value="{if $el.value!='empty' && !$value}{$smarty.now|date:"m"}{/if}{if $value}{$value|date:"m"}{/if}" size="2" maxlength="2" class="defaultInputText" style="width:auto" onChange="{$el.name}form_date()">
			<input type="text" name="{$el.name}_d" value="{if $el.value!='empty' && !$value}{$smarty.now|date:"d"}{/if}{if $value}{$value|date:"d"}{/if}" size="2" maxlength="2" class="defaultInputText" style="width:auto" onChange="{$el.name}form_date()">&nbsp;&nbsp;&nbsp;&nbsp;
			<input type="text" name="{$el.name}_h" value="{if $el.value!='empty' && !$value}{$smarty.now|date:"H"}{/if}{if $value}{$value|date:"H"}{/if}" size="2" maxlength="2" class="defaultInputText" style="width:auto" onChange="{$el.name}form_date()"> :
			<input type="text" name="{$el.name}_i" value="{if $el.value!='empty' && !$value}{$smarty.now|date:"i"}{/if}{if $value}{$value|date:"i"}{/if}" size="2" maxlength="2" class="defaultInputText" style="width:auto" onChange="{$el.name}form_date()"> :
			<input type="text" name="{$el.name}_s" value="{if $el.value!='empty' && !$value}{$smarty.now|date:"s"}{/if}{if $value}{$value|date:"s"}{/if}" size="2" maxlength="2" class="defaultInputText" style="width:auto" onChange="{$el.name}form_date()">
		</td>		
	</tr>
</table>
{else}
<table width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td height="1" bgcolor="#DBE1E5"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
	</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0" bgcolor="#F8F9F9">	
	<tr>
		<td width="15"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
		<td width="25%" height="25" class="defaultFormLabel">{if $el.name}{t t=$el.name}{else}{t t=$name}{/if}</td>
		<td>
			{if $el.name}
				<input type="text" name="{$el.name}" value="{$el.value|escape:"html"}"  class="defaultInputText">
			{/if}
		</td>		
	</tr>
</table>
{/if}
{/foreach}